package core
{
	import flash.display.Bitmap;
	import flash.media.Camera;
	
	import starling.display.Image;
	import starling.text.BitmapFont;
	import starling.text.TextField;
	import starling.textures.Texture;
	import starling.textures.TextureAtlas;
	import objects.Background;

	public class Assets
	{
		/**
		 * Embedded images
		 * */
		[Embed(source="../media/background.jpg")]
		public static const Background:Class;
		
		[Embed(source="../media/atlas.png")]
		public static const Atlas:Class;
		
		[Embed(source="../media/fonts/myFont_0.png")]
		public static const MyFont:Class;
		
		/**
		 * Embed XML
		 * */
		[Embed(source="../media/atlas.xml", mimeType="application/octet-stream")]
		public static const AtlasXML:Class;
		
		[Embed(source="../media/fonts/myFont.fnt", mimeType="application/octet-stream")]
		public static const MyFontXML:Class;
		
		[Embed(source="../media/particles/smoke.pex", mimeType="application/octet-stream")]
		public static const SmokeParticleXML:Class;
		
		[Embed(source="../media/particles/explosion.pex", mimeType="application/octet-stream")]
		public static const ExplosionParticleXML:Class;
		
		/**
		 * Embed sounds
		 * */
		[Embed(source="../media/audio/player-shoot.mp3")]
		public static const SoundPlayerShoot:Class;
		
		[Embed(source="../media/audio/enemy-explode.mp3")]
		public static const SoundEnemyExplode:Class;
		
		[Embed(source="../media/audio/DST-ElektroHauz-44khz.mp3")]
		public static const SoundBackgroundMusic:Class;
		
		public static const PLAY_PLAYER_SHOOT:String = "playPlayerShoot";
		public static const PLAY_ENEMY_EXPLODE:String = "playEnemyExplode";
		public static const PLAY_BACKGROUND_MUSIC:String = "playBackgroundMusic";
		
		/**
		 * Textures
		 * */
		public static var skyTexture:Texture;
		public static var atlasTexture:TextureAtlas;
		
		public static function init():void
		{
			skyTexture = Texture.fromBitmap(new Background());
			
			atlasTexture = new TextureAtlas(Texture.fromBitmap(new Atlas()), XML(new AtlasXML()));

			var bitmapFont:BitmapFont = new BitmapFont(Texture.fromBitmap(new MyFont()), XML(new MyFontXML()));
			TextField.registerBitmapFont(bitmapFont);
		}
	}
}



































